Function |saturating_to_u16

std/conv::|saturating_to_u16


Usage

|saturating_to_u16<T>(value)

Generics

◻ T: SaturatingToU16

Parameters

↳ value: T

Return

↴ u16


Turns data into u16, saturating if needed.

This function makes a saturating and infaillible conversion to u16. If incoming data represents something out of bounds for u16, then the resulting value is set to minimum or maximum, depending what is the closest to truth.